// 打造 store
import { createStore, applyMiddleware } from "redux";  //  applyMiddleware 是调用中间件的
import { composeWithDevTools } from "redux-devtools-extension"
import rootReducer from "../reducers";
// const store = createStore(rootReducer, composeWithDevTools(中间件))
import thunk from "redux-thunk"  //  中间件
// react  redux-thunk  redux-sage  redux-promise

const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)))

export default store